package com.ziyia.a282;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.CalendarView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    private void actionIntent(Class target) {
        Intent intent = new Intent(MainActivity.this, target);
        startActivity(intent);
    }

    public void calendarView(View view) {
        actionIntent(MyCalenderView.class);
    }

    public void datePicker(View view) {
        actionIntent(MyDatePicker.class);
    }


    public void timePicker(View view) {
        actionIntent(MyTimePicker.class);
    }
}